1. Field of the Invention
The present invention relates to testing of applications, and more particularly, to load testing of web applications running on a server.
2. Description of the Related Art
Currently, there are a number of conventional methods for load testing of web applications. A typical web application consists of a client part executed by a browser and a server part executed on a remote server. The server receives requests from a client and response to them. A load on a server can vary depending on a type of requests, a number of requests, request frequency, number of users that use the application at any one time, etc.
In order to determine how the server reacts to peak loads, the load testing (or stress testing) is used. As a result of this testing, a server response time under various loads can be determined. Conventional methods for an automated load testing of web applications use a number of approaches. One is launching a plurality of browser instances each of which “plays” some usage scenario that has been “prerecorded” with a help of specialized software, such as Selenium, see http:**seleniumhq.org/. Another one is recording network traffic generated by a browser while testing an application and applying the recorded traffic to a required number of emulated users.
In other words, all conventional load testing systems can be divided into two classes: systems that launch a plurality of browsers, and systems that emulate network traffic. Both of these systems have certain disadvantages and shortcomings. The load testing systems that launch a plurality of browsers are limited by resources of a computer used for testing, because a browser is a resource-consuming component. Thus, running thousands of browsers for load testing is not always possible. Furthermore, while a browser uses most of its resources for rendering and processing of a user interface of a tested application, these features cannot be turned off, so the resources usage remains high. In some cases, a browser can be run without GUI (a head-less mode). In such mode, thebrowser still renders user interface of web application but it is not shown on the screen. This makes browser consumes less (but still significant amount of) computational power.
The load testing systems that emulate network traffic are limited in terms of flexibility of the testing scenarios. These systems also do not provide accurate analysis of server responses and analysis of behavior of a client portion of the application. The client part of web application interacts with server part according to logic that was programmed by a software engineer. The logic can be quite complicated and tends to evolve over time. In a traffic emulation approach, traffic has to be re-recorded each time a change is made in the logic of the web application. But even having up to date traffic record might be not enough to emulate this scenario reliably for some usage scenarios. The authentic client can produce network traffic that can vary from run to run or can vary due to a change in conditions (such as network failures, network timeouts and so on). All this might lead to a change in set/order/content of network requests that authentic client sends, and makes our prerecorded traffic useless.
Some traffic recording systems provides some kind of scripting languages that can be used to repeat the logic of authentic client, but that would mean that two such systems have to be supported.
Accordingly, there is a need in the art for an effective and efficient method for load testing of web applications.